﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Drawing;
using System.Text;
using System.Data;

namespace Model
{
    public abstract class AInfo
    {
        Bitmap plattegrond;

        public Bitmap Plattegrond
        {
            get { return plattegrond; }
            set { plattegrond = value; }
        }
        List<Artikel> winkelWagenInhoud;

        public List<Artikel> WinkelWagenInhoud
        {
            get { return winkelWagenInhoud; }
            set { winkelWagenInhoud = value; }
        }

        List<string> alleCategoriën;

        public List<string> AlleCategoriën
        {
            get { return alleCategoriën; }
            set { alleCategoriën = value; }
        }

        public Winkelwagen BesteRoute
        {
            get { return Winkel.GetInstance().BesteUitkomst; }
        }

        //DataSet naamId;

        //public DataSet NaamId
        //{
        //    get { return naamId; }
        //    set { naamId = value; }
        //}

        public event EventHandler oplossingErbij;

        public void oplossingGevonden()
        {
            if (oplossingErbij != null)
            {
                oplossingErbij(this,new EventArgs());
            }
        }

        public void HelemaalKlaar()
        {
            if (klaar != null)
            {
                klaar(this,new EventArgs());
            }
        }

        public event EventHandler klaar;

        public event EventHandler temp;

        public void lanceerKlaar()
        {
            if(temp != null)
                temp(this, new EventArgs());
        }

        public void StuurWagen(Winkelwagen winkelwagen)
        {
            if (temp != null)
                temp(winkelwagen, new EventArgs());
        }

        private List<Rek> rekken;

        public List<Rek> Rekken
        {
            get
            {
                Winkel winkel = Winkel.GetInstance(); return winkel.Rekken; 
            }
            set { rekken = value; }
        }
        

    }

    public class ModelP2 : AInfo
    {
        private static ModelP2 singleton;
        private ModelP2(){}
        public static ModelP2 GetInstance() 
        {
            if (singleton == null) { singleton = new ModelP2(); }
            return singleton;
        }
    }
}
